package com.baymax.study.redisson.infrastructure.locks.framework;

import java.util.concurrent.TimeUnit;

public interface DistributedWriteLock {

    boolean forceUnlock(String lockName);

    boolean isLocked(String lockName);

    void lock(String lockName);

    boolean tryLock(String lockName, Long waitTime, Long leaseTime, TimeUnit unit);

    boolean tryLock(String lockName, Long lockTime, TimeUnit unit);

    void unlock(String lockName);

    boolean isHeldByCurrentThread(String lockName);

}
